﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;

namespace LearnHelper
{
    public class StopwatchHelper
    {
        public static long Milliseconds(Action action)
        {
            Stopwatch watch = new Stopwatch();
            watch.Start();
            action?.Invoke();
            watch.Stop();
            return watch.ElapsedMilliseconds;
        }
    }
}
